home *** CD-ROM | disk | FTP | other *** search
/ Digital Downs / Digital Downs.iso / zz.bat < prev   
Encoding:
DOS Batch File  |  1995-08-08  |  8.8 KB  |  358 lines

  1. @ECHO OFF
  2. CLS
  3. REM              Terry E. Mercer may be reached at:
  4. REM              4184 Hilsinger Road, Phoenix, OR 97535
  5. REM
  6. REM              Micromedia Publishers, Inc. may be reached at:
  7. REM              505 NE 7th, Grants Pass, OR  97526
  8. REM              1-503-474-1111 or 1-503-471-4133 (both Voice) or
  9. REM              1-503-474-2486 or 1-503-471-8836 (both Fax)
  10. REM
  11. ECHO.
  12. ECHO.
  13. ECHO.
  14. ECHO        This Program is to assist in the Installation of programs
  15. ECHO         found on this CD, using the MMPI & PBG CD Rom Launcher
  16. ECHO                 ══════════════════════════════════════════
  17. ECHO                 Written by Terry E. Mercer c 8 August 1995
  18. ECHO         This batch program is Copyright Protected, and may be used
  19. ECHO      ONLY as specified by Terry Mercer or MicroMedia Publishers, Inc.
  20. ECHO.
  21. ECHO.
  22. ECHO      NOTE: This program can also Un-Install (Delete and Remove)
  23. ECHO            everything it installs! It has done so safely and
  24. ECHO            perfectly on all of our test systems running DOS 6.xx!
  25. ECHO.
  26. ECHO            Help is available by typing in ZZ /? at the DOS prompt.
  27. ECHO.
  28. ECHO.
  29. ECHO.
  30. PAUSE
  31. cls
  32. IF "%1"=="/?" GOTO HELP
  33. IF !%1==! GOTO NOCHOICE
  34.  
  35. IF "%1"=="C:" GOTO HELP
  36. IF "%1"=="c:" GOTO HELP
  37. IF "%1"=="D:" GOTO HELP
  38. IF "%1"=="d:" GOTO HELP
  39. IF "%1"=="E:" GOTO HELP
  40. IF "%1"=="e:" GOTO HELP
  41. IF "%1"=="F:" GOTO HELP
  42. IF "%1"=="f" GOTO HELP
  43. IF "%1"=="G:" GOTO HELP
  44. IF "%1"=="g:" GOTO HELP
  45. IF "%1"=="C" GOTO HELP
  46. IF "%1"=="c" GOTO HELP
  47. IF "%1"=="D" GOTO HELP
  48. IF "%1"=="d" GOTO HELP
  49. IF "%1"=="E" GOTO HELP
  50. IF "%1"=="e" GOTO HELP
  51. IF "%1"=="F" GOTO HELP
  52. IF "%1"=="f" GOTO HELP
  53. IF "%1"=="G" GOTO HELP
  54. IF "%1"=="g" GOTO HELP
  55.  
  56. IF NOT EXIST C:\DOS\CHOICE.COM GOTO WRONGDOS
  57.  
  58. REM  DRIVES C: AND D: WILL AUTOMATICALLY BE CHECKED... IF THE END-USERS
  59. REM  CD DRIVE IS D: (for example) THEN IT WILL TRY TO DELETE IT... IT MAY
  60. REM  FAIL AND NOT CHECK THE REST. LOOK FOR MENU.EXE (NOT XCOPIED TO HDD)
  61. REM  FOR FAIL-SAFE. MOST PEOPLE WILL BE INSTALLING TO C: DRIVE OR WILL
  62. REM  HAVE A CD DRIVE WITH A LETTER OTHER THAN D: (A CD D: is immpossible
  63. REM  to have with more than one hard drive, therefore C: is most common
  64. REM  place to install the CD).
  65. REM EXCEPTIONS: Stacker, Drive Space, & Double Space Drives (Logical drives).
  66.  
  67. IF "%2"=="DELETE" GOTO DELET
  68.  
  69. IF "%2"=="E:" GOTO HARDE
  70. IF "%2"=="F:" GOTO HARDF
  71. IF "%2"=="G:" GOTO HARDG
  72.  
  73. IF "%3"=="E:" GOTO HARDE
  74. IF "%3"=="F:" GOTO HARDF
  75. IF "%3"=="G:" GOTO HARDG
  76.  
  77. GOTO BEGIN
  78.  
  79. :WRONGDOS
  80. ECHO.
  81. ECHO.
  82. ECHO       This Program requires DOS 6.xx or better to run properly.
  83. ECHO               ══════════════════════════════════════════
  84. ECHO.
  85. ECHO       If you see this message, either you do NOT have MicroSoft
  86. ECHO       DOS v6.xx or the CHOICE command has been deleted. Either
  87. ECHO       copy the Choice command back in your DOS directory, or
  88. ECHO       consult your DOS manual to manually copy the programs to
  89. ECHO       their own directories.
  90. ECHO.
  91. ECHO       We will make one last attempt to install the programs
  92. ECHO       properly... the program you selected will be placed in
  93. ECHO       a directory named MMPI in the C drive ("C:\MMPI>").
  94. ECHO.
  95. PAUSE
  96. GOTO NOCHOICE
  97.  
  98. :NOCHOICE
  99. IF NOT Exist C:\DOS\XCOPY.EXE GOTO SLOW
  100. IF NOT EXIST ZZ.BAT GOTO NOCD
  101. ECHO.
  102. ECHO    This will take a few minutes, please be patient...
  103. ECHO.
  104. ECHO.
  105. ECHO  Remember, only files ending in EXE, COM, and BAT can start
  106. ECHO  programs. Many programs will require running SETUP, if such
  107. ECHO  a file (program) exists. If you do NOT want to install the
  108. ECHO  program at this time, hold down the Control (Ctrl) key and 
  109. ECHO  press the letter C. Answer Y(es) to the question "Terminate Batch?"
  110. ECHO.
  111. ECHO.
  112. PAUSE
  113. XCOPY *.* C:\MMPI\*.* /V
  114. GOTO RUN1
  115.  
  116. :SLOW
  117. MD C:\%1
  118. COPY *.* C:\%1\*.*
  119. CD C:\%1
  120. C:
  121. CALL MMPI.BAT
  122. GOTO END
  123.  
  124. :NOTHING
  125. ECHO.
  126. ECHO.
  127. ECHO       The program was not able to correctly access the necessary
  128. ECHO       information to complete the installation to your hard disk.
  129. ECHO.
  130. ECHO       The version of DOS you have on your system is either too
  131. ECHO       old or incomplete. Consult your DOS manual to manually copy
  132. ECHO       the programs to their own directories. We can not guarantee
  133. ECHO       that the programs will work correctly at this point.
  134. ECHO.
  135. ECHO.
  136. GOTO END
  137.  
  138. :NOCD
  139. ECHO.
  140. ECHO.
  141. ECHO     You must start this program directly from the CD Rom Drive,
  142. ECHO     from DOS... with your CD as the default drive. Example "D:\>,"
  143. ECHO     where "D" is the letter designating your CD Rom drive.
  144. ECHO.
  145. ECHO                     ...Please try again...
  146. ECHO.
  147. GOTO END
  148.  
  149. :BEGIN
  150. ECHO.
  151. ECHO.
  152. ECHO       Please press the letter corresponding to your hard drive
  153. ECHO             (C, D, E, F, and G are valid drive choices)
  154. ECHO.
  155. ECHO.
  156. CHOICE /c:cdefg /n
  157. if errorlevel 5 goto DRIVE5
  158. if errorlevel 4 goto DRIVE4
  159. if errorlevel 3 goto DRIVE3
  160. if errorlevel 2 goto DRIVE2
  161. if errorlevel 1 goto DRIVE1
  162.  
  163. :DRIVE1
  164. md c:\%1
  165. xcopy *.* /V c:\%1
  166. cd c:\%1
  167. c:
  168. GOTO RUN
  169.  
  170. :DRIVE2
  171. md d:\%1
  172. xcopy *.* /v d:\%1
  173. cd d:\%1
  174. d:
  175. GOTO RUN
  176.  
  177. :DRIVE3
  178. md e:\%1
  179. xcopy *.* /v e:\%1
  180. cd e:\%1
  181. e:
  182. GOTO RUN
  183.  
  184. :DRIVE4
  185. md f:\%1
  186. xcopy *.* /v f:\%1
  187. cd f:\%1
  188. f:
  189. GOTO RUN
  190.  
  191. :DRIVE5
  192. md g:\%1
  193. xcopy *.* /v g:\%1
  194. cd g:\%1
  195. g:
  196. GOTO RUN
  197.  
  198. :RUN
  199. IF !%1==! GOTO RUN1
  200. GOTO RUNIT
  201.  
  202. :RUNIT
  203. ECHO.
  204. ECHO.
  205. ECHO       Do you want to Run the program from your hard drive NOW?
  206. ECHO.
  207. CHOICE /c:yn /n /t:Y,10
  208. IF ERRORLEVEL 2 GOTO DELET
  209. IF ERRORLEVEL 1 GOTO RUN2
  210.  
  211. :RUN1
  212. if not exist mmpi.bat goto Sorry
  213. C:
  214. CD\MMPI
  215. CALL C:\MMPI\mmpi.bat
  216. GOTO RUNOVER
  217.  
  218. :RUN2
  219. CALL %1
  220. GOTO RUNOVER
  221.  
  222. :RUNOVER
  223. echo.
  224. echo.
  225. echo     You may need to run the Setup program (if one exists) if the
  226. echo     game locked up or did not seem to work properly. Just enter 
  227. echo     the directory C:\%1 then type %1 and press ENTER. 
  228. echo.
  229. echo     (Where C: is your hard drive designation).
  230. echo.
  231. echo   Running setup (if it exists) will allow you to change sound settings
  232. echo   mouse, joystick, and/or any other settings appropriate to THAT program.
  233. echo.
  234. echo.
  235. pause
  236. goto delet
  237.  
  238. :DELET
  239. IF !%1==! GOTO SORRY
  240. GOTO UNINSTALL
  241.  
  242. :UNINSTALL
  243. IF NOT EXIST C:\DOS\CHOICE.COM GOTO DELET2
  244. ECHO.
  245. ECHO.
  246. ECHO            Are you sure you want to Delete this Program?
  247. ECHO.
  248. CHOICE /c:yn /n /t:Y,60
  249. IF ERRORLEVEL 2 GOTO END
  250. IF ERRORLEVEL 1 GOTO DELET3
  251.  
  252. :DELET2
  253. ECHO.
  254. ECHO.
  255. ECHO       Do you want to Delete this Program from your hard disk?
  256. ECHO.
  257. ECHO       If you DO then press the enter key... if not, hold down
  258. ECHO       the Control (CTRL) key and press the letter C then Y(es).
  259. ECHO.
  260. ECHO.
  261. PAUSE
  262. GOTO DELET3
  263.  
  264. :DELET3
  265. IF EXIST C:\%1\ZZ.BAT GOTO HARDC
  266. IF EXIST D:\%1\ZZ.BAT GOTO HARDD
  267. IF EXIST E:\%1\ZZ.BAT GOTO HARDE
  268. IF EXIST F:\%1\ZZ.BAT GOTO HARDF
  269. IF EXIST G:\%1\ZZ.BAT GOTO HARDG
  270. GOTO SORRY
  271.  
  272. :HARDC
  273. C:
  274. CD\
  275. CD %1
  276. IF NOT EXIST ZZ.BAT GOTO SORRY
  277. ECHO  The Program (and files) were found on Drive C - do you want to continue?
  278. GOTO NEXT
  279.  
  280. :HARDD
  281. IF EXIST MENU.EXE GOTO HELP
  282. D:
  283. CD\
  284. CD %1
  285. IF NOT EXIST ZZ.BAT GOTO SORRY
  286. ECHO  The Program (and files) were found on Drive D - do you want to continue?
  287. GOTO NEXT
  288.  
  289. :HARDE
  290. E:
  291. CD\
  292. CD %1
  293. IF NOT EXIST ZZ.BAT GOTO SORRY
  294. ECHO  The Program (and files) were found on Drive E - do you want to continue?
  295. GOTO NEXT
  296.  
  297. :HARDF
  298. F:
  299. CD\
  300. CD %1
  301. IF NOT EXIST ZZ.BAT GOTO SORRY
  302. ECHO  The Program (and files) were found on Drive F - do you want to continue?
  303. GOTO NEXT
  304.  
  305. :HARDG
  306. G:
  307. CD\
  308. CD %1
  309. IF NOT EXIST ZZ.BAT GOTO SORRY
  310. ECHO  The Program (and files) were found on Drive G - do you want to continue?
  311. GOTO NEXT
  312.  
  313. :NEXT
  314. ECHO.
  315. ECHO        Please wait... this may take a few mintues, depending on
  316. ECHO        the speed of your computer and hard disk drive.
  317. ECHO.
  318. ECHO. Y | DEL *.*
  319. CD\
  320. RD %1
  321. GOTO END
  322.  
  323. :SORRY
  324. ECHO.
  325. ECHO  Sorry, but this program is not working correctly on your computer.
  326. ECHO  Or has been installed to a directory with a name other than %1
  327. ECHO  See your DOS manual or consult a smart friend to Un-Install this.
  328. ECHO.
  329. pause
  330. goto HELP
  331.  
  332. :HELP
  333. ECHO.
  334. ECHO.
  335. ECHO   This file is intended to assist the end-user in the installation
  336. ECHO   and Un-Installation of DOS based programs found on MMPI CD Roms. 
  337. ECHO   Parameters must be given if ran outside of the menu program. Please 
  338. ECHO   consult your DOS manual or a smart friend for more details.
  339. ECHO.
  340. ECHO   %%1 is the name of the EXE, COM, or BAT file used to start the
  341. ECHO       program. It will also be the same name as the directory it
  342. ECHO       creates for the program on the hard drive.
  343. ECHO.
  344. ECHO   %%2 is to determine whether or not to DELETE or Un-Install.
  345. ECHO.
  346. ECHO   %%3 is for a Stacker, Double Space or Drive Space drive if the
  347. ECHO       CD is drive D and the program was installed to drive E,F, or G.
  348. ECHO.
  349. ECHO.
  350. ECHO   Example: ZZ %1 DELETE F:
  351. ECHO.
  352. ECHO   ZZ is %%1  %1 is the executable  DELETE runs Un-Install mode  F: is F drive.
  353. ECHO.
  354. ECHO.
  355. GOTO END
  356.  
  357. :end
  358.